package com.xiaoshuidi.cloud.module.report.dal.mapper.report;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.xiaoshuidi.cloud.framework.mybatis.core.mapper.BaseMapperX;
import com.xiaoshuidi.cloud.module.report.dal.DO.report.ReportContractDayRentDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
@InterceptorIgnore(tenantLine = "true")
public interface ReportContractDayRentMapper extends BaseMapperX<ReportContractDayRentDO> {

    @Select("select * from report_contract_day_rent where contract_id = #{contractId}")
    List<ReportContractDayRentDO> selectDayRentList(@Param("contractId") Long contractId);

    @Select("select * from report_contract_day_rent where contract_id = #{contractId} and month_days = #{monthDays} limit 1")
    ReportContractDayRentDO selectDayRent(@Param("contractId") Long contractId,@Param("monthDays")int monthDays);

    @Select("select * from report_contract_day_rent where contract_id = #{contractId} and month_days = #{monthDays} limit 1")
    ReportContractDayRentDO selectByContratIdAndDays(@Param("contractId") Long contractId,@Param("monthDays")Integer monthDays);
}
